import ReactDOM from "react-dom/client"
import { HashRouter } from "react-router-dom"
import App from "./App"
import { Provider } from "react-redux"
import store from "./store"
import { Suspense } from "react"

const root = ReactDOM.createRoot(document.getElementById("root"))
root.render(
  // Suspense 异步组件，配合路由里的React.lazy函数一起使用
  <Suspense fallback={"loading...也可以是element"}>
    <HashRouter>
      <Provider store={store}>
        <App />
      </Provider>
    </HashRouter>
  </Suspense>
)
